package com.scitc.service;

import com.scitc.mapper.HistoryMapper;
import com.scitc.model.HistoryItem;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author: zk
 * @date: 2021/7/11 1:07
 * @description: null
 */
@Service
public class HistoryService {

    @Autowired
    HistoryMapper historyMapper;

    public List<HistoryItem> findAllHis(String id) {
        return historyMapper.findAllHis(id);
    }

    public void addHis(HistoryItem historyItem) {
        historyMapper.addHis(historyItem);
    }

    public Integer countHis(String id) {
        return historyMapper.countHis(id);
    }

    public Integer removeHis(String id) {
        return historyMapper.removeHis(id);
    }

    public HistoryItem findTheOldest(String id){
        return historyMapper.findTheOldest(id);
    }
}
